package com.nisco.dms.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.validator.constraints.NotBlank;

@Entity
@Table(name = "Dc_Sys_Dictionary")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE, region = "com.nisco.dms.entity")
public class Dictionary extends CoreEntity {

	@NotBlank
	@Column(length = 20)
	private String strSn;

	@NotBlank
	@Column(length = 100, nullable = false)
	private String strName;

	@Column(length = 200)
	private String strDesc;

	public String getStrSn() {
		return strSn;
	}

	public void setStrSn(String strSn) {
		this.strSn = strSn;
	}

	public String getStrName() {
		return strName;
	}

	public void setStrName(String strName) {
		this.strName = strName;
	}

	public String getStrDesc() {
		return strDesc;
	}

	public void setStrDesc(String strDesc) {
		this.strDesc = strDesc;
	}

	/**
	 * reflectionToString将对象输出为string类型。
	 */
	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}

}
